package com.kotlin.dongdong.framework.mvp

/**
 * Created by dongdongzheng on 2018/2/12.
 */
abstract class BasePresenter<E : BaseModel, T : BaseView> {
    /**
     * 模型，包含业务模型和数据模型
     */
    var mModel: E? = null

    /**
     * 视图
     */
    var mView: T? = null

//    var mRxManager = RxManager()

    fun setVM(v: T, m: E) {
        this.mView = v
        this.mModel = m
        this.onStart()
    }

    // 数据加载初始化
    abstract fun onStart()

    fun onDestroy() {
//        mRxManager.clear()
    }
}